﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace Acms.DatabaseTest.Helpers
{
    public class ParamCollection : List<SqlParameter>
    {
        public SqlParameter this[string name]
        {
            get
            {
                if(string.IsNullOrEmpty(name))
                {
                    throw new ArgumentNullException("name");
                }
                return this.FirstOrDefault(x => name.Equals(x.ParameterName, StringComparison.CurrentCultureIgnoreCase));
            }
        }
    }
}
